#include <iostream>
#include <vector>

using namespace ::std;
using std::vector;

int main() {
  string text("abcdefg");
  char sought = 'a';
  auto begin = text.begin(), end = text.end();
  auto mid = text.begin() + (text.end() - text.begin()) / 2;
  while (mid != end && *mid != sought) {
    if (sought < *mid) {
      end = mid;
    } else {
      begin = mid + 1;
    }
    mid = begin + (end - begin) / 2;
  }
  cout << *mid << endl;
  return 0;
}